getProperty
Returns a property of the CDocBuilderValue
object.
Please note, that for the
.docbuilder
file theCDocBuilderValue.getProperty
method is not used.
Syntax
CDocBuilderValue getProperty(String name);
Parameters
Parameter | Type | Description |
---|---|---|
name | String | The name of the CDocBuilderValue object property. |
Example
Java
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
CDocBuilderValue api = global.get("Api");
CDocBuilderValue document = api.call("GetDocument");
CDocBuilderValue docPr = document.getProperty("color");
CDocBuilder.dispose();
There are two more ways to get a property of the CDocBuilderValue
object:
-
use the
get
method that takes an argument in the string format:CDocBuilderValue get(String name);
Example
Java
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
CDocBuilderValue api = global.get("Api");
CDocBuilderValue document = api.call("GetDocument");
CDocBuilderValue docPr = document.get("color");
CDocBuilder.dispose(); -
use the
default[]
postfix expression that takes an argument in the string format:property CDocBuilderValue default[String]
Example
Java
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilderContext context = builder.getContext();
CDocBuilderValue global = context.getGlobal();
CDocBuilderValue api = global.get("Api");
CDocBuilderValue document = api.call("GetDocument");
CDocBuilderValue docPr = document["color"];
CDocBuilder.dispose();